﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using StateGrid.MDBservice;

namespace StateGrid.WWHY{
/// <summary>
/// Summary description for WWHY_SYML
/// </summary>
public class WWHY_SYML : SYML
{

    /// <summary>
    /// 分类编码
    /// </summary>
    public String flbm{
        get;
        set;
    }

    /// <summary>
    /// 索引编码
    /// </summary>
    public String sybm{
        get;
        set;
    }

    /// <summary>
    /// 文种
    /// </summary>
    public String wz{
        get;
        set;
    }

    /// <summary>
    /// 年份
    /// </summary>
    public int nf{
        get;
        set;
    }

    /// <summary>
    /// 中文名称
    /// </summary>
    public String zwmc{
        get;
        set;
    }

    /// <summary>
    /// 外文名称
    /// </summary>
    public String wwmc{
        get;
        set;
    }

    /// <summary>
    /// 主办单位
    /// </summary>
    public String zbdw{
        get;
        set;
    }

    /// <summary>
    /// 承办单位
    /// </summary>
    public String cbdw{
        get;
        set;
    }

    /// <summary>
    /// 出版单位
    /// </summary>
    public String chbdw{
        get;
        set;
    }

    /// <summary>
    /// 发布日期
    /// </summary>
    public DateTime fbrq{
        get;
        set;
    }

    /// <summary>
    /// 国图分类
    /// </summary>
    public String gtfl{
        get;
        set;
    }

    /// <summary>
    /// 会议地点
    /// </summary>
    public String hydd{
        get;
        set;
    }

    /// <summary>
    /// 简介
    /// </summary>
    public String jj{
        get;
        set;
    }

    /// <summary>
    /// 馆藏号
    /// </summary>
    public String gch{
        get;
        set;
    }

    /// <summary>
    /// 登录日期
    /// </summary>
    public DateTime dlrq
    {
        get;
        set;
    }

	public WWHY_SYML()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    public override string ToString()
    {
        String ret;
        ret = "[分类编码]" + this.flbm + " [索引编码]" + this.sybm + " [外文名称]" + this.wwmc;
        return ret;
    }

    public override string AllContent()
    {
        String ret = "('" + flbm + "','" + "','" + sybm + "','" + wz + "','" + nf + "','" + zwmc + "','" + wwmc + "','" + zbdw + "','" + cbdw + "','" + chbdw + "','" + fbrq.ToString() + "','" + gtfl + "','" + hydd + "','" + jj + "','" + gch + "','" + dlrq + "')";
        return ret;
    }

    public override void fillEmptyStringAsNull()
    {
        String temp = "NULL";
        if (String.Empty.Equals(this.flbm)) flbm = temp;
        if (String.Empty.Equals(this.sybm)) sybm = temp;
        if (String.Empty.Equals(this.wz)) wz = temp;
        //跳过整型“年份”
        if (String.Empty.Equals(this.zwmc)) zwmc = temp;
        if (String.Empty.Equals(this.wwmc)) wwmc = temp;
        if (String.Empty.Equals(this.zbdw)) zbdw = temp;
        if (String.Empty.Equals(this.cbdw)) cbdw = temp;
        if (String.Empty.Equals(this.chbdw)) chbdw = temp;
        //跳过DataTime型“发布日期”
        if (String.Empty.Equals(this.gtfl)) gtfl = temp;
        if (String.Empty.Equals(this.hydd)) hydd = temp;
        if (String.Empty.Equals(this.jj)) jj = temp;
        //        if (String.Empty.Equals(this.gch)) gch = temp;
        //跳过DataTime型“登录日期”
    }

    public override void eraseNullInEmptyString()
    {
        String temp = "NULL";
        if (temp.Equals(this.flbm)) flbm = String.Empty;
        if (temp.Equals(this.sybm)) sybm = String.Empty;
        if (temp.Equals(this.wz)) wz = String.Empty;
        //跳过整型“年份”
        if (temp.Equals(this.zwmc)) zwmc = String.Empty;
        if (temp.Equals(this.wwmc)) wwmc = String.Empty;
        if (temp.Equals(this.zbdw)) zbdw = String.Empty;
        if (temp.Equals(this.cbdw)) cbdw = String.Empty;
        if (temp.Equals(this.chbdw)) chbdw = String.Empty;
        //跳过DataTime型“发布日期”
        if (temp.Equals(this.gtfl)) gtfl = String.Empty;
        if (temp.Equals(this.hydd)) hydd = String.Empty;
        if (temp.Equals(this.jj)) jj = String.Empty;
        if (temp.Equals(this.gch)) gch = String.Empty;
        //跳过DataTime型 "登录日期"
    }
}
}